﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Entity
{
    public class Contact
    {
        #region[Public Properties]

        public string Id { get; set; }
        public string Name { get; set; }
        public string Company { get; set; }
        public string Address { get; set; }
        public string Tel { get; set; }
        public string Mail { get; set; }
        public string Detail { get; set; }
        public string Date { get; set; }
        public string Active { get; set; }
        public string Lang { get; set; }

        #endregion
        #region[ContactIDataReader]

        public static Contact ContactIDataReader(IDataReader dr)
        {
            var obj = new Contact
                              {
                                  Id=Convert.ToString(dr["Id"]),
                                  Name=Convert.ToString(dr["Name"]),
                                  Company = Convert.ToString(dr["Company"]),
                                  Address = Convert.ToString(dr["Address"]),
                                  Tel = Convert.ToString(dr["Tel"]),
                                  Mail=Convert.ToString(dr["Mail"]),
                                  Detail=Convert.ToString(dr["Detail"]),
                                  Date = Convert.ToString(dr["Date"]),
                                  Active=Convert.ToString(dr["Active"]),
                                  Lang=Convert.ToString(dr["Lang"])
                              };
            return obj;
        }

        #endregion

    }
}
